package com.elite.groovy.callback
import groovy.json.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.RequestDispatcher;
import com.elite.groovy.util.EliteBean;
import java.security.MessageDigest;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.wisdge.dataservice.Result;
import groovy.swing.impl.DefaultAction;
import java.util.Map;
import java.util.Date;
import java.util.HashMap;
import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;

import com.elite.groovy.util.Util;
import cn.com.kh.HttpClientProxy;
import java.util.UUID;


public class apiDealTransState implements ServiceBackInvoke{
	private static final Log log=LogFactory.getLog(apiDealTransState.class);
	public String doCallBack(EliteBean eliteBean,HttpServletRequest request,HttpServletResponse response) {

		response.setCharacterEncoding("UTF-8");
		log.debug("start apiDealTransState-----------------");
		log.debug("request--:" + request);

		String getMethod = request.getMethod();
		String callJson = "";
		BufferedReader iny = null;

		def OUTArray = "";
		def reJson = "";
		def TransState="";
		def TransTime="";
		def TransSeq ="";
		def Reserved1="";
		def Reserved2="";
		def TransDate="";
		def TransCode="";
		def TransSource="";
		def httpURL="";
		def S3Sign="";
		def RdSeq =""
		def RecOrgFlag="";
		def CorpAct="";
		def CorpEntity="";
		def VCorpEntity="";
		def VCorpAct="";
		def VCorpBank="";
		def CorpBank="";
		def OppAct="";
		def Amount="";
		def Abstract="";
		def PayInfoCode="";
		def PayInfo="";
		def PayMadeDate="";
		def CancelState="";
		def CancelInfo="";
		def RecChannel="";
		def CircPaymentNo="";
		def nsftqh="";
		def Coreresult ="";
		def Corerecode ="";
		def Coreremag ="";
		def in_traceId ="";
		def sendBody="";
		def reCode="";
		def reMsg="";
		def salechannel="";
		def queryMap2="";
		def queryList2="";
		def querySql2="";

		log.debug("getMethod:" + getMethod);
		if (getMethod.equals("GET")) {
			callJson = request.getParameter("data");
			log.debug("原始Get请求参数:" + callJson);
		} else {
			InputStreamReader reader = new InputStreamReader(request.getInputStream(), "UTF-8");
			iny = new BufferedReader(reader);
			String line;
			while ((line = iny.readLine()) != null) {
				callJson += line;
			}
			log.debug("原始Post请求参数:" + callJson);
		}

		try {
			//解析返回Json内容
			JSONObject jsonObject = new JSONObject(callJson);

			//解析所需要的值
			String reData = GetJV(jsonObject, "data");
			if(reData==""){
				reCode = GetJV(jsonObject, "TransCode");
				reMsg = GetJV(jsonObject, "TransSeq");
				reData = GetJV(jsonObject, "IN");
				TransSource = GetJV(jsonObject, "TransSource");
				TransCode = GetJV(jsonObject, "TransCode");
				TransSeq = GetJV(jsonObject, "TransSeq");
				TransDate = GetJV(jsonObject, "TransDate");
				TransTime = GetJV(jsonObject, "TransTime");
			}else {
				nsftqh="Y";
				reCode = GetJV(jsonObject, "code");
				reMsg = GetJV(jsonObject, "errMsg");
				TransSource = GetJV(jsonObject, "source");
				TransCode = GetJV(jsonObject, "code");
				TransSeq = GetJV(jsonObject, "errMsg");
				TransDate = GetJV(jsonObject, "requestTime");
				TransTime = GetJV(jsonObject, "requestTime");
				in_traceId = GetJV(jsonObject, "traceId");
			}


			log.debug("返回reData：" +reData);
			

			if(nsftqh=="Y") {
				//新收付，调用WBJK_BF_74通知承保确认
				def querySql3 = "select webserviceurl from sysc_interface  where webtype='JK_BF_18' and rownum=1";
				def queryList3=eliteBean.chaxun_sql(querySql3, "dataSource");
				def queryMap3=queryList3[0];
				def httpURL3=queryMap3.get("webserviceurl");
				JSONObject dataObject = new JSONObject(reData);
				S3Sign = GetJV(dataObject, "RdSeq");//交易流水号
				RdSeq = GetJV(dataObject, "tradeNo");
				TransState = GetJV(dataObject, "tradeStatus");
				RecOrgFlag = GetJV(dataObject, "recOrgFlag");
				CorpAct = GetJV(dataObject, "corpAct");
				CorpEntity = GetJV(dataObject, "corpEntity");
				VCorpEntity = GetJV(dataObject, "vCorpEntity");
				VCorpAct = GetJV(dataObject, "businessID");//商户号
				VCorpBank = GetJV(dataObject, "tradeType");
				CorpBank = GetJV(dataObject, "corpBank");
				OppAct = GetJV(dataObject, "cardNo");//付款人账号
				Amount = GetJV(dataObject, "amount");
				Abstract = GetJV(dataObject, "bankTradeNo");//对账码
				PayInfoCode = GetJV(dataObject, "payInfoCode");
				PayInfo = GetJV(dataObject, "payInfo");
				PayMadeDate = GetJV(dataObject, "payMadeDate");
				CancelState = GetJV(dataObject, "cancelState");
				CancelInfo = GetJV(dataObject, "cancelInfo");
				RecChannel = GetJV(dataObject, "recChannel");
				CircPaymentNo = GetJV(dataObject, "circPaymentNo");
				Reserved1 = GetJV(dataObject, "respReserved1");
				Reserved2 = GetJV(dataObject, "respReserved2");
				//新收付
				httpURL=httpURL3;
				String uuid= UUID.randomUUID().toString().replace("-", "");
				String time=new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
				log.debug("新收付");

				querySql2 = "select salechannel,substr(applyentity,0,4) as org from ty_webmsg where rdseq = '"+ RdSeq +"' and rownum=1";
				queryList2=eliteBean.chaxun_sql(querySql2, "dataSource");
				queryMap2=queryList2[0];

				log.debug("queryMap2值:" + queryMap2);
				salechannel="";
				if(queryMap2!=null){
					log.debug("salechannel1:" + salechannel);
					salechannel=queryMap2.get("salechannel");
					log.debug("salechannel2:" + salechannel);
				}else{
					salechannel="123";
				}

				//需要需承保确认数据
				def querySql5 = "select k.offerno,s.loginname,k.agencycode,c.risk_type from (select offerno offerno, createdby, agencycode,riskcode from tabccarinsurance where tradeno = '"+ RdSeq +"' and offerno is not null union select quote_no offerno, createdby, agencycode,riskcode from tabccarinsurance where tradeno = '"+ RdSeq +"' and quote_no is not null) k left join staff s on k.createdby=s.staff_id left join c_riskcode c on c.risk_code=k.riskcode";
				def resultList=eliteBean.chaxun_sql(querySql5, "dataSource");
				def resultListNum = resultList.size();
				log.debug("本次调用数量PolicyStatus:"+resultListNum);
				//新收付承保确认调用
				def selectSQL2="SELECT WEBSERVICEURL FROM SYSC_INTERFACE where WEBTYPE='WBJK_BF_74'";
				def postURL2=eliteBean.chaxun_sql(selectSQL2,"dataSource");
				def postURL=postURL2[0].get("WEBSERVICEURL");
				def businessNo=""; //交强/商业投保单号
				def operatorCode=""; //工号
				def companyCode="";  //业务归属机构
				def risk_type="";  //业务归属机构

				if(resultListNum>0) {
					def result="";
					def PROPOSAL="";
					String quoteNo="";
					String re_businessNo="";
					String underWriteInd;
					String forceNo="";
					String acceptDate="";
					String traceId="";
					String underwriteEndDate="";
					for (int k=0;k<resultListNum;k++) {
						def queryMap5=resultList[k];
						businessNo=queryMap5.get("offerno");
						operatorCode=queryMap5.get("loginname");
						companyCode=queryMap5.get("agencycode");
						risk_type=queryMap5.get("risk_type");
						JSONObject obj = new JSONObject();
						JSONObject obj2 = new JSONObject();
						obj2.put("businessNo", businessNo);
						obj2.put("operatorCode", operatorCode);
						obj2.put("companyCode", companyCode);
						obj.put("data", obj2);
						obj.put("requestTime", time);
						obj.put("source", "DX");
						obj.put("traceId", uuid);
						obj.put("requestType", "WBJK_BF_74");
						log.debug("承保确认调用发送URL:" + postURL + " 发送报文:" + obj);
						result =  HttpClientProxy.sendPost(postURL,obj,"",8888);
						log.debug("承保确认调用接口结果:"+result);
						JSONObject jsonObject2 = new JSONObject(result);
						String code = GetJV(jsonObject2, "code");
						if(code.equals("200")) {
							String reData2 = GetJV(jsonObject2, "data");
							JSONObject jsonObject3 = new JSONObject(reData2);
							quoteNo = GetJV(jsonObject3, "quoteNo");
							re_businessNo = GetJV(jsonObject3, "businessNo");
							underWriteInd = GetJV(jsonObject3, "underWriteInd");
							forceNo = GetJV(jsonObject3, "forceNo");
							acceptDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.parseLong(String.valueOf(GetJV(jsonObject3, "acceptDate")))));
							underwriteEndDate =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.parseLong(String.valueOf(GetJV(jsonObject3, "underwriteEndDate")))));
							//大保单号
							if(re_businessNo==null||re_businessNo==""){
								PROPOSAL=forceNo;
							}else
							{
								PROPOSAL=re_businessNo;
							}
							if(risk_type!='1'){
								re_businessNo="";
							}
							if(underWriteInd=='6')
							{
								if(forceNo==null||forceNo==""){

									def updateSQL1="update tabccarinsurance t set  t.full_policy_no='"+PROPOSAL+"',t.sy_policycode='"+re_businessNo+"',t.insurance_status= '"+underWriteInd+"',t.checkdate=to_date('"+underwriteEndDate+"','yyyy-mm-dd hh24:mi:ss'),t.paydate=to_date('"+acceptDate+"','yyyy-mm-dd hh24:mi:ss') where (t.quote_no ='"+quoteNo+"' or t.offerno='"+quoteNo+"')";
									log.debug("打印更新tabccarinsurance:"+updateSQL1);
									eliteBean.update(updateSQL1,'dataSource');
								}
								else{
									def updateSQL1="update tabccarinsurance t set  t.full_policy_no='"+PROPOSAL+"',t.jq_policycode='"+forceNo+"',t.insurance_status= '"+underWriteInd+"',t.checkdate=to_date('"+underwriteEndDate+"','yyyy-mm-dd hh24:mi:ss'),t.paydate=to_date('"+acceptDate+"','yyyy-mm-dd hh24:mi:ss') where (t.quote_no ='"+quoteNo+"' or t.offerno='"+quoteNo+"')";
									log.debug("打印更新tabccarinsurance:"+updateSQL1);
									eliteBean.update(updateSQL1,'dataSource');
								}
								def updateSQL2="update tabcrelation t set t.policy_no='"+PROPOSAL+"',t.check_date =to_date('"+underwriteEndDate+"','yyyy-mm-dd hh24:mi:ss'),t.paydate=to_date('"+acceptDate+"','yyyy-mm-dd hh24:mi:ss') where (t.quote_no ='"+quoteNo+"' or offer_no='"+quoteNo+"')";
								log.debug("更新成功tabcrelation:"+updateSQL2);
								eliteBean.update(updateSQL2,'dataSource');

							}
						}
						//记录日志
						def insertSQL3="insert into qt_dm_ifc_log_new(id,offer_no,ifc_no,send_info,return_info,send_time,return_time) values (Sys_Guid(),'" + quoteNo + "','WBJK_BF_74','" + obj.toString() + "','" + result + "',sysdate,sysdate)";
						eliteBean.update(insertSQL3,'dataSource');
					}
				}

				String Syncresult ="";

				def deleteSQL="Delete From ty_webmsgback Where Rdseq= '" + RdSeq + "'";
				log.debug("ty_webmsgback删除处理sql:"+deleteSQL);
				eliteBean.update(deleteSQL,'dataSource');

				def insertSQL="Insert Into ty_webmsgback (Trans_Guid, Transsource, Transcode, Transdate, Transtime, Transseq, S3sign, Rdseq, Transstate, Recorgflag, Corpact, Corpentity, Vcorpentity, Vcorpact, Vcorpbank, Corpbank, Oppact, Amount, Abstract, Payinfocode, Payinfo, Paymadedate, Cancelstate, Cancelinfo, Recchannel,CircPaymentNo,Reserved1, Reserved2, createddate, Coresend, Coreresult, Corerecode, Coreremag, Syncresult) Values ('TRAN' || Sys_Guid(), '" + TransSource + "', '" + TransCode + "', '" + TransDate + "', '" + TransTime + "', '" + TransSeq + "', '" + S3Sign + "', '" + RdSeq + "', '" + TransState + "', '" + RecOrgFlag + "', '" + CorpAct + "', '" + CorpEntity + "', '" + VCorpEntity + "', '" + VCorpAct + "', '" + VCorpBank + "', '" + CorpBank + "', '" + OppAct + "', '" + Amount + "', '" + Abstract + "', '" + PayInfoCode + "', '" + PayInfo + "', '" + PayMadeDate + "', '" + CancelState + "', '" + CancelInfo + "', '" + RecChannel + "','" + CircPaymentNo + "', '" + Reserved1 + "', '" + Reserved2 + "', Sysdate, '" + sendBody + "', '" + Coreresult + "', '" + Corerecode + "', '" + Coreremag + "', '" + Syncresult + "')";
				log.debug("ty_webmsgback新增处理sql:"+insertSQL);
				eliteBean.update(insertSQL,'dataSource');

				reJson= "{\"code\":\"200\",\"errMsg\":\"\",\"traceId\":\""+ in_traceId +"\",\"data\":\"{}\"}";

			}else {

				log.debug("返回reData：" +reData);
				JSONArray jsonArray = new JSONArray(reData);
				int dataArrayLen = jsonArray.length();
				log.debug("返回Code：" + reCode + "返回Msg：" + reMsg + "返回DataArray：" + jsonArray.toString() + "DataArray Size:" + dataArrayLen);

				//旧收付,调用核心系统通知承保确认
				def querySql1 = "select webserviceurl from sysc_interface  where webtype='MVURL' and rownum=1";
				def queryList1=eliteBean.chaxun_sql(querySql1, "dataSource");
				def queryMap1=queryList1[0];
				def httpURL1=queryMap1.get("webserviceurl");
			    JSONObject dataObject = null;
				for(int i = 0; i < dataArrayLen; i++) {
					dataObject = jsonArray.getJSONObject(i);

					S3Sign = GetJV(dataObject, "S3Sign");
					RdSeq = GetJV(dataObject, "RdSeq");
					TransState = GetJV(dataObject, "TransState");
					RecOrgFlag = GetJV(dataObject, "RecOrgFlag");
					CorpAct = GetJV(dataObject, "CorpAct");
					CorpEntity = GetJV(dataObject, "CorpEntity");
					VCorpEntity = GetJV(dataObject, "VCorpEntity");
					VCorpAct = GetJV(dataObject, "VCorpAct");
					VCorpBank = GetJV(dataObject, "VCorpBank");
					CorpBank = GetJV(dataObject, "CorpBank");
					OppAct = GetJV(dataObject, "OppAct");
					Amount = GetJV(dataObject, "Amount");
					Abstract = GetJV(dataObject, "Abstract");
					PayInfoCode = GetJV(dataObject, "PayInfoCode");
					PayInfo = GetJV(dataObject, "PayInfo");
					PayMadeDate = GetJV(dataObject, "PayMadeDate");
					CancelState = GetJV(dataObject, "CancelState");
					CancelInfo = GetJV(dataObject, "CancelInfo");
					RecChannel = GetJV(dataObject, "RecChannel");
					CircPaymentNo = GetJV(dataObject, "CircPaymentNo");
					Reserved1 = GetJV(dataObject, "Reserved1");
					Reserved2 = GetJV(dataObject, "Reserved2");

					//调用核心系统通知承保确认
					querySql1 = "select webserviceurl from sysc_interface  where webtype='MVURL' and rownum=1";
					queryList1=eliteBean.chaxun_sql(querySql1, "dataSource");
					queryMap1=queryList1[0];
					httpURL=queryMap1.get("webserviceurl");

					querySql2 = "select salechannel from ty_webmsg where rdseq = '"+ RdSeq +"' and rownum=1";
					queryList2=eliteBean.chaxun_sql(querySql2, "dataSource");
					queryMap2=queryList2[0];

					log.debug("queryMap2值:" + queryMap2);
					salechannel="";
					if(queryMap2!=null){
						salechannel=queryMap2.get("salechannel");
					}else{
						salechannel="123";
					}


					sendBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
							"<PACKET TYPE=\"REQUEST\" VERSION=\"1.0\">\n" +
							"  <HEAD>\n" +
							"    <REQUEST_TYPE>PAY002</REQUEST_TYPE>\n" +
							"  </HEAD>\n" +
							"  <BODY>\n" +
							"    <TRADENO>" + RdSeq + "</TRADENO>\n" +
							"    <BUSINESSNAME>太平保险有限公司</BUSINESSNAME>\n" +
							"    <CARDTYPE>005</CARDTYPE>\n" +
							"    <BUSINESSID>" + VCorpAct + "</BUSINESSID>\n" +
							"    <CARDBANK></CARDBANK>\n" +
							"    <CARDNO></CARDNO>\n" +
							"    <EFFECTIVEPERIOD></EFFECTIVEPERIOD>\n" +
							"    <SYSTEMNO></SYSTEMNO>\n" +
							"    <TRADETYPE></TRADETYPE>\n" +
							"    <AMOUNT>" + Amount + "</AMOUNT>\n" +
							"    <OLDSERIALNO></OLDSERIALNO>\n" +
							"    <TRADEDATE>" + TransDate + "</TRADEDATE>\n" +
							"    <TRADETIME>" + TransTime + "</TRADETIME>\n" +
							"    <TRADEACCOUNT>" + CorpAct + "</TRADEACCOUNT>\n" +
							"    <ASKNUMBER>" + Abstract + "</ASKNUMBER>\n" +
							"    <TRANSSOURCE>" + TransSource + "</TRANSSOURCE>\n" +
							"    <RECCHANNEL>" + salechannel + "</RECCHANNEL>\n" +
							"    <CIRCPAYMENTNO>" + CircPaymentNo + "</CIRCPAYMENTNO>\n" +
							"  </BODY>\n" +
							"</PACKET>";


					try {

						String coreResult="";
						if(TransState=="2"){
							log.debug("系统转发核心系统调用发送URL:" + httpURL + " 发送报文:" + sendBody);
							coreResult = HttpClientProxy.sendPost(httpURL, sendBody, "", 8888);
							log.debug("系统转发核心系统调用返回结果:" + coreResult);
						}

					} catch (Exception e) {
						log.debug("系统转发核心系统调用异常:" + e.getMessage());
					}

					String Syncresult ="";

					def deleteSQL="Delete From ty_webmsgback Where Rdseq= '" + RdSeq + "'";
					log.debug("调用话单详情接口处理删除SQL:"+deleteSQL);
					eliteBean.update(deleteSQL,'dataSource');

					def insertSQL="Insert Into ty_webmsgback (Trans_Guid, Transsource, Transcode, Transdate, Transtime, Transseq, S3sign, Rdseq, Transstate, Recorgflag, Corpact, Corpentity, Vcorpentity, Vcorpact, Vcorpbank, Corpbank, Oppact, Amount, Abstract, Payinfocode, Payinfo, Paymadedate, Cancelstate, Cancelinfo, Recchannel,CircPaymentNo,Reserved1, Reserved2, createddate, Coresend, Coreresult, Corerecode, Coreremag, Syncresult) Values ('TRAN' || Sys_Guid(), '" + TransSource + "', '" + TransCode + "', '" + TransDate + "', '" + TransTime + "', '" + TransSeq + "', '" + S3Sign + "', '" + RdSeq + "', '" + TransState + "', '" + RecOrgFlag + "', '" + CorpAct + "', '" + CorpEntity + "', '" + VCorpEntity + "', '" + VCorpAct + "', '" + VCorpBank + "', '" + CorpBank + "', '" + OppAct + "', '" + Amount + "', '" + Abstract + "', '" + PayInfoCode + "', '" + PayInfo + "', '" + PayMadeDate + "', '" + CancelState + "', '" + CancelInfo + "', '" + RecChannel + "','" + CircPaymentNo + "', '" + Reserved1 + "', '" + Reserved2 + "', Sysdate, '" + sendBody + "', '" + Coreresult + "', '" + Corerecode + "', '" + Coreremag + "', '" + Syncresult + "')";
					log.debug("调用话单详情接口处理成功SQL:"+insertSQL);
					eliteBean.update(insertSQL,'dataSource');

					//处理返回信息
					if(OUTArray == null || OUTArray.length() <= 0) {
						OUTArray = "{ \"RdSeq\":\""+ RdSeq +"\", \"TransState\":\""+ TransState +"\", \"ErrorMsg\":\"\", \"Reserved1\":\"\", \"Reserved2\":\"\"}";
					}
					else {
						OUTArray = OUTArray+",{ \"RdSeq\":\""+ RdSeq +"\", \"TransState\":\""+ TransState +"\", \"ErrorMsg\":\"\", \"Reserved1\":\"\", \"Reserved2\":\"\"}";
					}
				}
				reJson= "{ \"OUT\":[ " + OUTArray + " ], \"TransCode\":\"NotifyRecState\", \"TransSource\":\"CORE \", \"RtnCode\":\"success\", \"TransTime\":\""+ TransTime +"\", \"TransDate\":\""+ TransDate +"\", \"S3Sign\":\"\", \"TransSeq\":\""+ TransSeq +"\", \"RtnMsg\":\"E0-处理成功\"}";

			}

		}
		catch(Exception e) {
			log.debug("接口处理异常"+e.getMessage());
			//失败返回
			//reJson= "{ \"OUT\":[ { \"RdSeq\":\"\", \"TransState\":\""+ TransState +"\", \"ErrorMsg\":\"\", \"Reserved1\":\"\", \"Reserved2\":\"\" } ], \"TransCode\":\"NotifyRecState\", \"TransSource\":\"CORE\", \"RtnCode\":\"fail\", \"TransTime\":\""+ TransTime +"\", \"TransDate\":\""+ TransDate +"\", \"S3Sign\":\"\", \"TransSeq\":\""+ TransSeq +"\", \"RtnMsg\":\"E0-处理异常\"}";
			reJson= "{\"code\":\"-1\",\"errMsg\":\"接口处理异常\",\"traceId\":\""+ in_traceId +"\",\"data\":\"{}\"}";

		}

		log.debug("apiDealTransState返回Json:"+reJson);
		return reJson;
	}



	private static String MD5(String s) {
		try {
			MessageDigest md = MessageDigest.getInstance("MD5");
			byte[] bytes = md.digest(s.getBytes("utf-8"));
			return toHex(bytes);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	private static String toHex(byte[] bytes) {

		final char[] HEX_DIGITS = "0123456789ABCDEF".toCharArray();
		StringBuilder ret = new StringBuilder(bytes.length * 2);
		for (int i = 0; i < bytes.length; i++) {
			ret.append(HEX_DIGITS[(bytes[i] >> 4) & 0x0f]);
			ret.append(HEX_DIGITS[bytes[i] & 0x0f]);
		}
		return ret.toString();
	}

	public static String GetJV(JSONObject inJson, String getKey) {
		String Rev_Value = null;
		try {
			Rev_Value = inJson.getString(getKey);
		} catch (Exception e) {
			try {
				Rev_Value = String.valueOf(inJson.getInt(getKey));
			} catch (Exception e1) {
				try {
					Rev_Value = String.valueOf(inJson.getJSONArray(getKey));
				} catch (Exception e2) {
					try {
						Rev_Value = String.valueOf(inJson.getJSONObject(getKey));
					} catch (Exception e3) {
						Rev_Value = "";
					}
				}
			}
		} finally {
			if (Rev_Value == null || Rev_Value.equals("null") || Rev_Value.length() <= 0) {
				log.warn("GetJV 获取参数值Exception-" + getKey + ":" + Rev_Value);
				Rev_Value = "";
			}else {
				log.debug("GetJV 获取参数值-" + getKey + ":" + Rev_Value);
			}
		}
		return Rev_Value;
	}
}